-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updated Model Training #42
Open
wendywangwwt
wants to merge
42
commits into
nadeemlab:main
Choose a base branch
from
wendywangwwt:update-training
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… for val during training and the latter for batchsize change during val/test)
…dd --optimizer in cli.py train
…calculation during training (after which the stats needs to be re-enabled); added debug mode for cli.py train; added a flag in cli.py train to enable validation loss calculation; allowed to specify epoch in cli.py serialize
…nconsistent inference results
…s commits); moved functions used only for tiff file to the bottom
…mizer class supported in torch.optim
…ing issue; moved val data loading to with_val condition
…ed calculate_losses method; always use opt.lr in optimizers; set cell count metrics in validation only for deepliif
…idation; removed duplicated function; fixed syntax error
… in training tests to highlight test params
Test environment:
All tests passed. Ran ext tests for twice and I did not see GPU OOM failure. Test logs are in onedrive folder |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR includes a couple of major updates for model training:
unet_512_attention
)--with-val
, validation losses (same types of loss as training) and metrics (cell count metrics throughpostprocess
function) can be calculated as training goes, and the corresponding support in visdom visualizer is also implementedOthers
--debug
inpython cli.py train
. Change the approximate number of steps/images to run per epoch for debug mode with--debug-data-size
(default to--debug-data-size 10
). This helps to quickly check if the training runs as expected.infer_modalities()
)--optimizer
,--net-g
,--net-gs
,--with-val
) and trainlaunch (gpu test cases only)Notes:
i) val images, same format as training images
ii) ground truth cell count metrics in json: this can be achieved by running get_cell_count_metrics():
The code generates the
metrics.json
file for the validation data under the same directory as the images.--basetemp
, so that the pytest processes will not delete or modify a temp folder created or used by another process. For example: